import logging



logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s')

if __name__ == '__main__':

    # 日志系统
    logging.debug('我是代码调试信息')
    logging.info('我是系统正餐输出信息')

    logging.warning('内存不够')
    logging.error('小bug')
    logging.critical('严重事故，导致系统崩溃')